package com.wang.common.domain;

import lombok.Data;

@Data
public class ComparableUser implements Comparable {
    public ComparableUser() {

    }

    public ComparableUser(int id, String name) {
        this.id = id;
        this.name = name;
    }

    private int id;
    private String name;

    @Override
    public int compareTo(Object o) {
        ComparableUser comparableUser = (ComparableUser) o;
        return this.id - comparableUser.getId();
    }
}
